class Myrev:
    def __init__(self,input):
        self.input = [x for x in input]
    def __iter__(self):
        return self

    def __next__(self):
        try :
            return self.input.pop()
        except IndexError:
            raise StopIteration


myrev = Myrev('love')
for i in myrev:
    print(i,end='')
